package com.sise.dubbo.dao;

import com.sise.dubbo.model.UserPO;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author zitian
 * @data 2019/1/12
 */
@Mapper
public interface UserDao {


    @Insert({
            "<script>",
            "insert into t_users01(id, name, password,age,sex,tel) values ",
            "<foreach collection='list' item='item' index='index' separator=','>",
            "(#{item.id}, DATABASE(), #{item.password}, #{item.age}," +
                    " #{item.sex}, #{item.tel})",
            "</foreach>",
            "</script>"
    })
    int batchInsertUserPO(@Param(value="list") List<UserPO> userPOList);



}
